<template>
	<p>{{details.title}}</p>
</template>

<script>
	import axios from "axios"
	import querystring from "querystring"
	export default {
		name: 'HelloWorld',
		data() {
			return {
				details: {}
			}
		},
		mounted() {
			//  	axios({
			// 	method:"get",
			// 	url:"http://iwenwiki.com/api/blueberrypai/getChengpinDetails.php"
			// }).then(res =>{
			// 	this.details = res.data.chengpinDetails[0]
			// })

			// axios({
			// 	method:"post",
			// 	url:"http://iwenwiki.com/api/blueberrypai/login.php",
			// 	data: querystring.stringify({
			// 		user_id:"iwen@qq.com",
			// 		password:"iwen123",
			// 		verification_code:"crfvw"
			// 	})
			// }).then(res =>{
			// 	console.log(res.data)
			// })

			axios.get("http://iwenwiki.com/api/blueberrypai/getChengpinDetails.php")
				.then(res => {
					this.details = res.data.chengpinDetails[0]
					console.log(res.data)
				})


			axios.post("http://iwenwiki.com/api/blueberrypai/login.php", querystring.stringify({
				user_id: "iwen@qq.com",
				password: "iwen123",
				verification_code: "crfvw"
			}))
			.then(res =>{
				console.log(res.data)
			})
		}
	}
</script>